using System.Data;
using Migrator.Framework;

namespace Bxo.Database {
    [Migration(200808192308)]
    public class M200808192308_CreateProjectsTable : Migration {
        public override void Up() {
            this.Database.AddTable(
                    "Projects",
                    new Column("Id", DbType.Int32, ColumnProperty.Identity),
                    new Column("Name", DbType.String, 50, ColumnProperty.NotNull),
                    new Column("CreationDateTime", DbType.DateTime, ColumnProperty.NotNull)
                    );
            this.Database.AddPrimaryKey("PK_Projects", "Projects", "Id");
        }

        public override void Down() {
            this.Database.RemoveTable("Projects");
        }
    }
}